

package cn.shengchao.examstar.rpc.distribute.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @program: examstarapi
 * @description: 分销角色
 * @author: Xiong weiqiang
 * @create: 2025-03-25 10:22
 */
@Getter
@AllArgsConstructor
public enum DistributeDataStatusEnum {
    STATUS_DRAFT(0, "草稿"), STATUS_CURT(1, "现行"), STATUS_HIS(2, "历史"),;

    private final int status;
    private final String description;

    public static DistributeDataStatusEnum getByStatus(int status) {
        for (DistributeDataStatusEnum distributeDataStatusEnum : DistributeDataStatusEnum.values()) {
            if (distributeDataStatusEnum.getStatus() == status) {
                return distributeDataStatusEnum;
            }
        }
        return null;
    }
}